package com.wmm.fast.main.shop2State;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;

/**
 * @Auther: wangzun
 * @Date: 2018/9/13 16:25
 * @Description: 维护一个ConcrateState子类的实例,这个实例定义当前状态
 */
@Slf4j
@Data
public class Context {

    public State state;

    private int count;

    public Context(State state) {
        this.state = state;
    }

    public void request() {
        state.handler(this);
    }
}
